<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<load href="__CSS__/menu.css" />
<link  rel="stylesheet" href="__CSS__/collegedetail_style.css" type="text/css"> 
	<title>课程管理</title>
		<load href= "__JS__/jshelper.js" /> 
			<script type="text/JavaScript">
				function courseedit(id){
					window.location.href="__URL__/courseedit/id/"+id;
				}
				function coursesearch(id){
					window.location.href="__URL__/coursedetail/id/"+id;
				}
				function coursedelete(id){
					if (confirm("你确定要删除吗")==true) 
						postwith('__URL__/coursedelete',{id:id});
				}
				function course(id)
				{
					postwith('__URL__/course',{id:id});
				}
				function show(){
									var tab=document.getElementById("tab");
									var tr=tab.getElementsByTagName("tr");
								for(var i=0;i<=tr.length;i++){
								if(i%2==0){
									tr[i].style.backgroundColor="#fff";
								}else{
									tr[i].style.backgroundColor="#f0f0f0";	
									}
								}
							}
					window.onload=show;
			</script>
</head>
<body bgcolor="#EEEEEE">
<layout name="Auth:header" />
<iframe src="__URL__/menu" style="position:absolute; left:40px; top:350px; width:180px; height:190px;" frameborder=”no” border=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no”></iframe>
<div style="position:relative; top:-50px; left:240px; font-size:12px; width:60%;">
当前位置：
<a href='__APP__/index/index'>主页</a>>
<a href='__URL__/index'>后台管理</a>>
课程管理
</div>
<div align="center">
<div align="left" style="width:800px; height:25px;">
				<a href="__URL__/courseadd" style="color:#3300CC;font-size:14px; text-decoration:none" >添加课程</a>|
		<a href="__URL__/courseadd" style="color:#3300CC; font-size:14px; text-decoration:none"  >批量添加课程</a>
		
			</div> 
	<div align="left" style="width:800px;height:80px;">
		<form method="get" action="__URL__/coursedetail" >
			课程名称<input type="text" name="name">
			院系名称<select name="dname">
						<option value></option>						  
							<volist name='deplist' id='vo'>
								<option value =	{$vo.name}>{$vo.name}</option>
							</volist>
					</select>
			<input type="submit" onClick="coursesearch(id)" value="查询">
		</form>
	</div>
	<if condition="$role neq '教师'">
	
			</if>
			<div id="course_Show" style="width:68%; position:relative ">
				<table width="100%" border="0" align="center" cellpadding="0px" cellspacing="0px">
					<thead style="background-color:f0f0f0;">
						<tr align="left" style="height:35px;">
							<td style="width:150px">课程名称</td>
							<td style="width:150px">所属院系</td>
							<td style="width:50px">操作</td>
						</tr>
					</thead>
	<load href"__PUBLIC__/js/list_show.js">
	<tbody id="tab" align="left">
	<volist name='list' id='vo' >
		<tr id="table_course_show" style="height:35px;">
		<if condition="$vo.isselect neq 0">
			<td style="width:180px"><strong>{$vo.name} (已选择)</strong></td><!--课程名称-->
			<else/>
			<td style="width:180px">{$vo.name}</td><!--课程名称-->
		</if>
		
		<td style="width:180px">{$vo.dname}</td><!--院系名称-->
		<td style="display:none;">{$vo.id}</td><!--课程ID-->
		<td style="width:180px">
		<if condition="$vo.isselect eq 0">
			<input type="button" name="courseedit"  onClick="course({$vo.id})" value="选择">
			<else/>
			<input type="button" name="courseedit"  onClick="course({$vo.id})" value="取消">
		</if>
				<if condition="$role neq '教师'">								
					<input type="button" name="courseedit"  onClick="courseedit({$vo.id})" value="编辑">
					<input name="delete_course" type="reset" onClick="coursedelete({$vo.id})" value="删除">
				</if>
		</td></tr>
	</volist>
	</tbody>		
</table>
</div>	<div class="green-black" align="right" style="width:800px; position:relative; top:20px; left:-120px;">{$page}</div>
</div>

</body>
</html>